package com.ruoyi.monitor.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.monitor.mapper.MonitorOperationLogMapper;
import com.ruoyi.monitor.domain.MonitorOperationLog;
import com.ruoyi.monitor.service.IMonitorOperationLogService;

/**
 * 操作日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-16
 */
@Service
public class MonitorOperationLogServiceImpl implements IMonitorOperationLogService 
{
    @Autowired
    private MonitorOperationLogMapper monitorOperationLogMapper;

    /**
     * 查询操作日志
     * 
     * @param logId 操作日志主键
     * @return 操作日志
     */
    @Override
    public MonitorOperationLog selectMonitorOperationLogByLogId(Integer logId)
    {
        return monitorOperationLogMapper.selectMonitorOperationLogByLogId(logId);
    }

    /**
     * 查询操作日志列表
     * 
     * @param monitorOperationLog 操作日志
     * @return 操作日志
     */
    @Override
    public List<MonitorOperationLog> selectMonitorOperationLogList(MonitorOperationLog monitorOperationLog)
    {
        return monitorOperationLogMapper.selectMonitorOperationLogList(monitorOperationLog);
    }

    /**
     * 新增操作日志
     * 
     * @param monitorOperationLog 操作日志
     * @return 结果
     */
    @Override
    public int insertMonitorOperationLog(MonitorOperationLog monitorOperationLog)
    {
        monitorOperationLog.setCreateTime(DateUtils.getNowDate());
        return monitorOperationLogMapper.insertMonitorOperationLog(monitorOperationLog);
    }

    /**
     * 修改操作日志
     * 
     * @param monitorOperationLog 操作日志
     * @return 结果
     */
    @Override
    public int updateMonitorOperationLog(MonitorOperationLog monitorOperationLog)
    {
        return monitorOperationLogMapper.updateMonitorOperationLog(monitorOperationLog);
    }

    /**
     * 批量删除操作日志
     * 
     * @param logIds 需要删除的操作日志主键
     * @return 结果
     */
    @Override
    public int deleteMonitorOperationLogByLogIds(Integer[] logIds)
    {
        return monitorOperationLogMapper.deleteMonitorOperationLogByLogIds(logIds);
    }

    /**
     * 删除操作日志信息
     * 
     * @param logId 操作日志主键
     * @return 结果
     */
    @Override
    public int deleteMonitorOperationLogByLogId(Integer logId)
    {
        return monitorOperationLogMapper.deleteMonitorOperationLogByLogId(logId);
    }
}
